<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<s:include value="/comm/header.jsp" />
<s:include value="/comm/menu.jsp" />
<div class="wrap1">
    	<div class="blank1"></div>
        <div class="outbox">
<!--1 start-->
			<div>
        		<div class="wrap_left">
            
                	<span class="tab7_tt">代购详情</span>
              
            	</div>
            	<div class="wrap_right">
            		<s:if test="order.state >= 0 && order.state <= 3">
            		<div>
						<div class="pbox6">
							<ul>
								<s:if test="order.state == 0">
                    				<li class="bg1">&nbsp;<li>
                    				<li class="s1"><span class="tt">1.&nbsp;&nbsp;确认订单</span></li>
                    				<li class="bg2">&nbsp;<li>
                    				<li class="s2"><span class="tt">2.&nbsp;&nbsp;托管代购款到代购岛平台</span></li>
                    				<li class="bg3">&nbsp;<li>
                    				<li class="s2"><span class="tt">3.&nbsp;&nbsp;经纪人发货</span></li>
                    				<li class="bg3">&nbsp;<li>
                    				<li class="s2"><span class="tt">4.&nbsp;&nbsp;确认收货</span></li>
                    				<li class="bg3">&nbsp;<li>
                    				<li class="s2"><span class="tt">5.&nbsp;&nbsp;评价</span></li>
                    				<li class="bg4">&nbsp;<li>
                    			</s:if>
                    			<s:elseif test="order.state == 1">
                    				<li class="bg6">&nbsp;<li>
                    				<li class="s2"><span class="tt">1.&nbsp;&nbsp;确认订单</span></li>
                    				<li class="bg3">&nbsp;<li>
                    				<li class="s2"><span class="tt">2.&nbsp;&nbsp;托管代购款到代购岛平台</span></li>
                    				<li class="bg7">&nbsp;<li>
                    				<li class="s3"><span class="tt">3.&nbsp;&nbsp;经纪人发货</span></li>
                    				<li class="bg2">&nbsp;<li>
                    				<li class="s2"><span class="tt">4.&nbsp;&nbsp;确认收货</span></li>
                    				<li class="bg3">&nbsp;<li>
                    				<li class="s2"><span class="tt">5.&nbsp;&nbsp;评价</span></li>
                    				<li class="bg4">&nbsp;<li>
                    			</s:elseif>
                    			<s:elseif test="order.state == 2">
                    				<li class="bg6">&nbsp;<li>
                    				<li class="s2"><span class="tt">1.&nbsp;&nbsp;确认订单</span></li>
                    				<li class="bg3">&nbsp;<li>
                    				<li class="s2"><span class="tt">2.&nbsp;&nbsp;托管代购款到代购岛平台</span></li>
                    				<li class="bg3">&nbsp;<li>
                    				<li class="s2"><span class="tt">3.&nbsp;&nbsp;经纪人发货</span></li>
                    				<li class="bg7">&nbsp;<li>
                    				<li class="s3"><span class="tt">4.&nbsp;&nbsp;确认收货</span></li>
                    				<li class="bg2">&nbsp;<li>
                    				<li class="s2"><span class="tt">5.&nbsp;&nbsp;评价</span></li>
                    				<li class="bg4">&nbsp;<li>
                    			</s:elseif>
                    			<s:else>
                    				<li class="bg6">&nbsp;<li>
                    				<li class="s2"><span class="tt">1.&nbsp;&nbsp;确认订单</span></li>
                    				<li class="bg3">&nbsp;<li>
                    				<li class="s2"><span class="tt">2.&nbsp;&nbsp;托管代购款到代购岛平台</span></li>
                    				<li class="bg3">&nbsp;<li>
     						<li class="s2"><span class="tt">3.&nbsp;&nbsp;经纪人发货</span></li>
                    				<li class="bg3">&nbsp;<li>
                    				<li class="s2"><span class="tt">4.&nbsp;&nbsp;确认收货</span></li>
                    				<li class="bg7">&nbsp;<li>
                    				<li class="s3"><span class="tt">5.&nbsp;&nbsp;评价</span></li>
                    				<li class="bg5">&nbsp;<li>
                    			</s:else>
                			</ul>
                        </div>
            		</div>
            		</s:if>
                </div>
                <div class="clear"></div>
            </div>
            
            
<!--1 end -->
  
			<div class="minfo">
				<div class="tips6">
					当前订单状态：
			<s:if test="order.state == 0">商品已拍下</s:if>
					<s:elseif test="order.state == 1">您已付款到代购岛平台，等待经纪人发货</s:elseif>
					<s:elseif test="order.state == 2">经纪人已发货</s:elseif>
					<s:elseif test="order.state == 3">交易已成功</s:elseif>
					<s:elseif test="order.state == 4">交易关闭</s:elseif>
				</div>
				<div class="tips1">
					<span class="span14">代购岛提醒您</span><br />
					<div id="tips">
						<s:if test="order.state == 0">
							1.点击这里&nbsp;<a href="cashier.htm?tid=<s:property value='order.transId' />"><span class="span_broker">付款</span></a><br/>
							2.如果您不想购买，可以&nbsp; <a href="cancel.htm?tid=<s:property value='order.transId' />">取消订单</a>
						</s:if>
						<s:elseif test="order.state == 1">
							1.付款72小时后如果经纪人一直不发货，您可以联系经纪人或&nbsp;<a href='#'>提醒经纪人发货</a><br/>
							2.如果经纪人存在延迟发货的情况（<a href='#'>什么是延迟发货</a>），您也不想再要货物，您可以&nbsp;<a href='#'>申请退款</a><br/>
							3.对于经纪人没有履行承诺的情况，如需投诉，您可以在退款成功后投诉维权
							
						</s:elseif>
						<s:elseif test="order.state == 2">
							1.请注意页面上方的时间提醒，如果您还没收到货，且自动打款时间快到了，您需要操作&nbsp;<a href='#'>延长收货时间</a>&nbsp;或&nbsp;<a href='#'>申请退款</a>。<br/> 
							2.如果已收到货，但商品有问题，您可以&nbsp;<a href='#'>申请退款</a><br/>
							3.如果您已收到货，且对商品满意，您可以&nbsp;<a href="receipt.htm?tid=<s:property value='order.transId' />"><span class="span_broker">确认收货</span></a>，打款给经纪人
						</s:elseif>
						<s:elseif test="order.state == 3">
							<s:if test="order.brokerEvaluation == 1">
								交易已成功，请给经纪人&nbsp;<a href="javascript:showDiv();"><span class="span_broker">评价</span></a>
							</s:if>
							<s:else>
								1.如果没有收到货，或收到货后出现问题，您可以联系经纪人协商解决。<br/>
								2.如果经纪人没有履行应尽的承诺，您可以“投诉维权”
							</s:else>
						</s:elseif>
					</div>
				</div>
				<div class="mtip">
					<span class="span36">订单信息</span><br />
					收货地址：<s:property value="order.address.person" />,<s:property value="order.address.phone" />,<s:property value="order.address.address" />,<s:property value="order.address.postcode"  /><br/>
					买家留言：<s:property value="order.message" />
				</div>
				<div class="mtip">
					<span class="span36">经纪人信息</span><br />
					【呢称】<s:property value="order.broker.nickName" />&nbsp;&nbsp;&nbsp;&nbsp;【真实姓名】<s:property value="order.broker.realName" />&nbsp;&nbsp;&nbsp;&nbsp;【联系电话】<s:property value="order.broker.mobile" />&nbsp;&nbsp;&nbsp;&nbsp;【邮件】<s:property value="order.broker.email" />
				</div>
				<div class="mtip">
					<span class="span36">订单信息</span><br />
					【订单编号】<s:property value="order.transId" />&nbsp;&nbsp;&nbsp;&nbsp;
					【成交时间】<s:date name="order.startTime" format="yyyy-MM-dd HH:mm:ss"/>&nbsp;&nbsp;&nbsp;&nbsp;
					<s:if test="order.state != 4">
						<s:if test="order.state >= 1">【付款时间】<s:date name="order.payTime" format="yyyy-MM-dd HH:mm:ss"/>&nbsp;&nbsp;&nbsp;&nbsp;</s:if>
						<s:if test="order.state ==3">【确认时间】<s:date name="order.endTime" format="yyyy-MM-dd HH:mm:ss"/></s:if>
					</s:if>
				</div>
			</div>

<!--订单确认列表开始-->
			<div class="pbox13">
				<table class="trading_tab">
		    		<tr>
		    			<th class="trading_th0">图片</th>
						<th class="trading_th1">名称</th>
						<th class="trading_th2">单价</th>
						<th class="trading_th3">服务费</th>
						<th class="trading_th4">数量</th>
						<th class="trading_th5">商品总价</th>
						<th class="trading_th6">运费</th>
		   			</tr>
		   				<s:iterator value="order.orderDetails" status="st">
		   					<tr>
		   						<td class="trading_td0">
		   							<a href="canBuyDetail.htm?id=<s:property value='productId' />" target="_blank">
		   								<img src="<s:property value='image50'/>"/>
		   							</a>
		   						</td>
		   						<td class="trading_td1"><a href="canBuyDetail.htm?id=<s:property value='productId' />" target="_blank"><s:property value="goodsName" /></a></td>
		   						<td class="trading_td2">￥<s:property value="price" /></td>
		   						<td class="trading_td3">￥<s:property value="serviceFee" /></td>
		   						<td class="trading_td4"><s:property value="number" /></td>
								<s:if test="#st.index == 0">
		   						<td class="trading_td5" rowspan="<s:property value='order.orderDetails.size' />"><s:property value="order.total" /></td>
		   						<td class="trading_td6" rowspan="<s:property value='order.orderDetails.size' />">￥<s:property value="order.logisticCharge" />
								</s:if>
		   					</tr>
						</s:iterator>
				</table>
				<div class="w1_order">实付款：<span class="span2">￥<s:property value="order.payment" /></span></div>
         </div>
         
 <!--订单确认列表结束-->
        </div>
</div>
<s:include value="/comm/bottom.jsp" />
<div class="pbox_dgc pbox_pingjia" id="pbox_dgc">
        
         <div class="wrap_right_dgc">
             <p><a href="javascript:closeDiv()">&nbsp;&nbsp;&nbsp;</a></p>
    	 </div>
         
         <div class="wrap_left_dgc">   
         		<s:form id="evaluate" action="evaluate" method="post">
         		<input type="hidden" name="tid" value="<s:property value='order.transId' />" />
         		<input type="hidden" name="userType" value="1" />
         		<dl>
              		
              		<dd>
              			评分：
              			<input type="radio" name="evaluateModel.level" value="1" checked />好评&nbsp;
              			<input type="radio" name="evaluateModel.level" value="2"/>中评&nbsp;
              			<input type="radio" name="evaluateModel.level" value="3"/>差评</dd>
              		<dd>
              			内容：<s:textfield id="info" name="evaluateModel.info" cssClass="input1" />
              		</dd>
              		<dd class="end1"><a href='javascript:$("#evaluate").submit();'>提交</a></dd>
           		</dl>
         		</s:form>
         </div>
        
        </div>
        <div id="fixbg_dgc" class="fixbg_dgc" style="display:none;">			
</div>

<SCRIPT type=text/javascript>
function showDiv(){
	document.getElementById('pbox_dgc').style.display='block';
	document.getElementById('fixbg_dgc').style.display='block';
}

function closeDiv(){
	document.getElementById('pbox_dgc').style.display='none';
	document.getElementById('fixbg_dgc').style.display='none';
}
</SCRIPT>